<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		
	</body>
</html>
<script>
	var stud= new Array();
	stud[0] = new Array("张萍",18,"女","会计","山东省日照市");
	stud[1] = new Array("刘文",19,"男","律师","山东省莱芜市");
	stud[2] = new Array("马春风",17,"女","律师","江苏省南通市");
	stud[3] = new Array("刘志清",18,"男","公务员","北京市通州区");
	document.write("<table><tr><th>姓名</th><th>年龄</th><th>性别</th><th>职业</th><th>籍贯</th></tr>");
	for (var i= 0;i<stud.length;i++) {
		var str="<tr>";
		for (var j in stud[i]) {
			str= str+"<td>"+stud[i][j]+"</td>";
		}
		str+="</tr>";
		document.write(str);
	}
	document.write("</table>")
</script>
<style>
	table,td,th{
		border: 1px solid #666666;
	}
	table{
		width: 320px;
		border-collapse:collapse ;
		margin: 10px auto;
	}
</style>